import { getAction, postAction  } from '@/api/manage'

// 工单数
const orderCount = (params) => getAction('/workflows/business/getAllTotal', params)
// 工单已办列表
const completeList = (params) => getAction('/workflows/business/finishOrderList', params)
// 工单待办列表
const dealList = (params) => getAction('/workflows/business/getOrderList', params)
// 工单我的列表
const draftList = (params) => getAction('/workflows/business/getMyAllList', params)
// 工单类型
const orderTypeList = (params) => getAction('/workflows/common/selectOrderTypePart', params)
// 业务类型
const serviceKindList = (params) => getAction('/workflows/common/serviceKindBySet', params)
// 二级业务类型
const serviceKindNameList = (params) => getAction('/workflows/common/serviceNextKindBySet', params)
// 附件上传
const uploadFile = (params) => postAction('/workflows/common/uploadFile', params)
// 创建工单
const addSave = (params) => postAction('/workflows/business/createOrder', params)
// 工单详情
const orderDetail = (params) => getAction('/workflows/business/getOrderInfo', params)
// 工单日志
const orderLog = (params) => getAction('/workflows/business/getOrderLog', params)
// 获取附件
const orderUploadDetail = (params) => getAction('/workflows/business/getFileList', params)
// 获取下一步
const nextStep = (params) => getAction('/workflows/business/getNextStep', params)
// 获取组织机构
const orgList = (params) => getAction('/workflows/common/getOrgInfo', params)
// 获取评价部门
const evaluteOrg = (params) => getAction('/workflows/business/getPjDeptList', params)
// 工单流转提交
const approveSave = (params) => postAction('/workflows/business/orderApprove', params)
// 获取发起人信息
const userInfo = (params) => getAction('/workflows/common/getUserInfo', params)
// 中台转派人员
const transUser = (params) => getAction('/workflows/business/getZtUserList', params)
// 删除附件
const delUpload = (params) => postAction('/workflows/common/deleteFile', params)
// 删除草稿
const delDraft = (params) => postAction('/workflows/business/deleteOrder', params)

export { 
  orderCount, completeList, dealList, draftList, orderTypeList, serviceKindList,
  serviceKindNameList, uploadFile, addSave, orderDetail, orderLog, orderUploadDetail,
  nextStep, orgList, evaluteOrg, approveSave, userInfo, transUser, delUpload, delDraft
}